﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo01
{
    class Hero     //父类
    {
        private string nickName;
        private string heroname;
        private string heroinfo;
        private int attack;
        private int defense;
        private int speed;

        public string NickName
        {
            get { return nickName; }
            set { this.nickName = value; }
        }
        public string HeroName
        {
            get { return heroname; }
            set { this.heroname = value; }
        }
        public string HeroInfo
        {
            get { return heroinfo; }
            set { this.heroinfo = value; }
        }
        public int Attack
        {
            get { return attack; }
            set { this.attack = value; }
        }
        public int Defense
        {
            get { return defense; }
            set { this.defense = value; }
        }
        public int Speed
        {
            get { return speed; }
            set { this.speed = value; }
        }

        public Hero(string nickName, string heroname, string heroinfo, int attack,int defense,int speed)
        {
            this.nickName = nickName;
            this.heroname = heroname;
            this.heroinfo = heroinfo;
            this.attack = attack;
            this.defense = defense;
            this.speed = speed;
        }

        public void pritln()
        {
            Console.WriteLine("我的昵称是{0}，我的英雄是{1}，{2}，攻击力{3}，防御力{4}，速度{5}",this.nickName,
                this.heroname,this.heroinfo,this.attack,this.defense,this.speed);
        }
    }
}
